package com.haynes.social.controller;

import com.haynes.social.common.Result;
import com.haynes.social.entity.User;
import com.haynes.social.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;
import java.util.Objects;

/**
 * @Author Haynes
 * @Date 2023/5/26 21:17
 * @PackageName:com.haynes.store.controller
 * @ClassName: UserController
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private IUserService userService;

    @PostMapping("/login")
    public Result<User> login(@RequestBody Map<String, Object> map){
        return userService.login(map);
    }
}
